home *** CD-ROM | disk | FTP | other *** search
/ No Fragments Archive 12: Textmags & Docs / nf_archive_12.iso / MAGS / SOURCES / ATARI_SRC.ZIP / atari source / AHDI / TTDRIVER / DB2SIDE.SLM < prev    next >
Encoding:
Text File  |  2001-02-09  |  31.0 KB  |  1,221 lines

  1. 5:
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60. U
  61.  
  62. U
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.                                               7CHAPTER  1
  74.  
  75.  
  76.                                         DB: THE ATARI DEBUGGER
  77.  
  78.  
  79.  
  80.  
  81.             Db 5is a debugger for the Atari ST and TT series of 68000-family computers.  It
  82.             is  intended  to  replace 7sid 5as the assembly-level debugger of choice.  It is
  83.             not a source-level debugger, but it does handle both Alcyon C and Mark  Willi-
  84.             ams C"187  (new and old) symbol table formats.
  85.  
  86.             Db can use any of the ST's character devices for its input and output, includ-
  87.             ing  the  screen,  the  serial  port,  and  the  MIDI port.  The I/O device is
  88.             selected with a switch on the command line (or in the TTP  window  if  started
  89.             from the desktop).
  90.  
  91.             Db is capable of debugging programs running on one machine while the  bulk  of
  92.             the  debugger  runs  on another.  This is called 6remote5 6debugging5, and permits
  93.             debugging of operating systems while they boot, for example.  This feature  is
  94.             described in the chapter REMOTE DEBUGGING.
  95.  
  96.  
  97.             7USAGE
  98.  
  99.                 5From a command shell, db can be started as follows:
  100.  
  101.                                    7db 5[ 6options5 ] [ 6program5 [ 6args5 ... ] ]
  102.  
  103.                 If started as a TTP program from the desktop, the arguments line looks the
  104.                 same without the word 7db 5at the beginning.
  105.  
  106.  
  107.             7OPTIONS
  108.  
  109.                 56Db5 can use many different devices for its input and  output.   This  makes
  110.                 debugging graphics- and keyboard-oriented programs easier.
  111.  
  112.                 These 6options5 on the command line select the output device to use:
  113.  
  114.  
  115.                 7-g
  116.  
  117.                     5Use GEMDOS to access the ST screen and keyboard.  This is the  default
  118.                     case,  but it does have limitations.  See the section 7DB AND GEMDOS 5in
  119.                     the chapter 7OPERATING SYSTEM CONSIDERATIONS 5for more information.
  120.  
  121.  
  122. U
  123.  
  124.             ________________________
  125.  
  126.  
  127.                "187 Mark Williams C is a trademark of Mark Williams Company.
  128.  
  129.  
  130. U
  131.  
  132.             JANUARY, 1990                   ATARI DEBUGGER                              DB
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.       DB                              ATARI DEBUGGER                   JANUARY, 1990
  141.  
  142.  
  143.           7-b56N5
  144.  
  145.               Use the BIOS to access the ST screen  and  keyboard.   Sometimes  this
  146.               helps  when  debugging  a  program which itself does BIOS I/O, because
  147.               using GEMDOS calls can mess up type-ahead and the like.
  148.  
  149.               You can (optionally) specify which BIOS device to use by  placing  the
  150.               BIOS device number after the 7-b5: "-b3" means "use BIOS calls for input
  151.               and output, and use BIOS device number 3 (the MIDI port).   The  argu-
  152.               ment  is  in  decimal.  Any  number at all may be used here, including
  153.               numbers which are not in fact BIOS device numbers; in this  case,  the
  154.               debugger  will  probably crash, and it is likely that you will have to
  155.               reset your machine.
  156.  
  157.  
  158.           7-s
  159.  
  160.               5Use the serial (RS232) port.  A terminal or an ST running  a  terminal
  161.               program  must  be connected via a "null modem" cable, and its keyboard
  162.               and screen are used for communicating with  the  debugger.   (You  can
  163.               even  use  a  modem  connection to a terminal or computer, but this is
  164.               extreme.)  The baud rate, parity, etc. for the serial port must be set
  165.               before starting the debugger in this mode.
  166.  
  167.  
  168.           7-m
  169.  
  170.               5Use the MIDI port.  An ST running a terminal program  which  uses  the
  171.               MIDI port must be connected with a double-MIDI cable (i.e. MIDI OUT ->
  172.               MIDI IN and MIDI IN -> MIDI  OUT).   One  such  program  is  7miditerm5,
  173.               included  on the distribution disk with the debugger.  It is a minimal
  174.               terminal emulator program, but it gets the job done.
  175.  
  176. U          In the last two modes, the debugger  controls  the  serial  or  midi  port
  177.           hardware  directly, without going through GEMDOS or the BIOS, so there are
  178.           fewer limitations on debugging programs which  use  GEMDOS  or  the  BIOS.
  179.           However,  the  the limitations with respect to the operating system always
  180.           apply, except when remote debugging.  See the section 7DB AND GEMDOS 5in the
  181.           chapter  7OPERATING  SYSTEM CONSIDERATIONS 5for more information.  Also, see
  182.           7iodev 5and 7bdev 5in the section on debugger variables.
  183.  
  184.  
  185.           Each of the options 7-g5, 7-b5, 7-s5, and 7-m 5can be followed by  the  letter  7x5:
  186.           this  controls  the  printing  of non-standard characters when using the 7d
  187.           5(dump) command. Non-standard characters are those with ASCII codes 128 and
  188.           up.  Normally,  these  are printed in the ASCII part of the dump command's
  189.           output.  When 7-s5, 7-m5, or 7-b 5with a device-number code is used, printing of
  190.           these  characters is suppressed, because they confuse most terminals.  The
  191.           presence of the letter 7x 5(e.g.  7-sx 5or 7-bx15) re-enables printing of  these
  192.           characters,  which can be useful if your terminal is in fact another Atari
  193.           computer with the same extended character set.  The 7x 5modifier  also  con-
  194.           trols  the  use  of  inverse  video  for  error  messages: if the Atari ST
  195.  
  196.  
  197. U      2                                                      "189  1988,1990 Atari Corp.
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.             JANUARY, 1990                   ATARI DEBUGGER                              DB
  206.  
  207.  
  208.                 extended character set is used, the VT52 code for inverse  video  will  be
  209.                 used too.
  210.  
  211.                 In addition, the following 6option5 controls loading of  the  initialization
  212.                 script:
  213.  
  214.  
  215.                 7-i56file5
  216.  
  217.                     The debugger normally searches for and executes a startup file when it
  218.                     is  run.   The  7-i 5option disables this.  With the optional 6file5 argu-
  219.                     ment, the normal startup file is not loaded, and 6file5 is loaded in its
  220.                     place.   There  must not be a space between the 7-i 5option and the 6file5
  221.                     argument: "7-imyfile5".  See the section  7USING  THE  DEBUGGER  5in  this
  222.                     chapter for more information.
  223.  
  224. D
  225.                     _______________________________________________________________
  226. U                     Usage examples:
  227.  
  228.                      db                    start the debugger; use GEMDOS for I/O.
  229.                      db -s myprog.prg -z
  230.                                            use  the  serial  port  for  I/O;  load
  231.                                            myprog.prg   for  execution,  with  the
  232.                                            command-line argument -z.
  233. D
  234.                     _______________________________________________________________
  235.                      |✓D
  236. |✓
  237. |✓
  238. |✓
  239. |✓
  240. |✓
  241. |
  242.  
  243.  
  244.  
  245.  
  246. U
  247.                                                                                     |✓D
  248. |✓
  249. |✓
  250. |✓
  251. |✓
  252. |✓
  253. |
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260. U
  261.  
  262.             7TERMS
  263.  
  264.                 5Several terms are used throughout this  document  which  must  be  defined
  265.                 here.
  266.  
  267.                 The 6client5 is the program you are debugging.
  268.  
  269.                 The 6head5 is the part of the debugger which handles all the user input  and
  270.                 output.   The  commands  you type are translated by the head into commands
  271.                 for the 6stub5.  It is the stub which causes the client  to  run,  processes
  272.                 breakpoints,  and  catches  exceptions  like  bus error.  The stub reports
  273.                 these events to the head, which reports them to you.
  274.  
  275.                 When you are 6remote5 6debugging5, the head runs on the  6master5  machine,  and
  276.                 the  stub and client run on the 6slave5 machine.  The head gives commands to
  277.                 the stub and receives the  stub's  responses  through  the  6communications5
  278.                 layer, which actually talks over a MIDI cable.
  279.  
  280.                 The term 6debugger5 is used to refer to the head, stub, and  communications;
  281.                 in short, everything but the client (program) and the user (human).
  282.  
  283.                 You cause the client to execute instructions with the 7g 5(go), 7t 5(trace), 7u
  284.                 5(untrace),  and 7v 5(verbose-trace) commands, collectively known as 6trace5/6go5
  285.                 commands.  A 6stop5 is anything which causes  a  trace/go  to  stop:  a  bus
  286.                 error,  address  error,  or  other processor 6exception5, a breakpoint whose
  287.                 count has reached zero, or a memory checkpoint which becomes true.  Memory
  288.                 checkpoints  are evaluated at times called 6opportunities5, which occur when
  289.  
  290.  
  291.  
  292.             "189  1988,1990 Atari Corp.                                                      3
  293.  
  294.  
  295.  
  296.  
  297.  
  298.  
  299.  
  300.       DB                              ATARI DEBUGGER                   JANUARY, 1990
  301.  
  302.  
  303.           processing exceptions, including the illegal-instruction exception  caused
  304.           by  breakpoints and the trace exception which happens between instructions
  305.           of a trace.
  306.  
  307.           You can put a list of commands to be executed in a file, and  cause  those
  308.           commands  to  be  executed  by  the debugger using the 7load 5command.  Such
  309.           files are called 6scripts5.  Also, 6procedures5 consisting  of  debugger  com-
  310.           mands, arguments, and local variables are available.
  311.  
  312.  
  313.       7USING THE DEBUGGER
  314.  
  315.           5When the debugger is started, it processes its GEMDOS command line  first.
  316.           If  there are any 6options5 (like 7-m 5or 7-s5) they are checked and dealt with.
  317.           Then, if there is a 6program5 argument, that program is loaded  and  set  up
  318.           for  executing.   It  becomes  the client.  If there are any 6args5 they are
  319.           placed in the client's basepage, as GEMDOS command-line arguments  to  it.
  320.           When the client is completely set up and ready to run, the debugger prints
  321.           out its basepage information (text size, environment pointer, etc.).  This
  322.           client set-up amounts to the same thing as using the 7exec 5command.
  323.  
  324.           The debugger then looks for and loads your configuration file (that is, it
  325.           executes  the  commands  found there; such files are called 6scripts5).  The
  326.           first place it looks is the current directory, for a  file  called  7db.rc5.
  327.           If that file doesn't exist, it looks for the file named in the environment
  328.           variable DBRC.  If there is no such environment variable, it looks for the
  329.           file  7db.rc  5in  the directory named by the environment variable HOME.  If
  330.           none of these files exists, the debugger simply continues with the  start-
  331.           up procedure.
  332.  
  333.           When remote debugging, the autoload procedure is the same, except that the
  334.           debugger looks for 7rdb.rc5, then the file named in the environment variable
  335.           RDBRC, followed by 7rdb.rc 5in the HOME directory.
  336.  
  337.           In either case, the 7-i 5option on the debugger's command line inhibits  the
  338.           loading  of  a  startup  file.  If the 7-i 5option has a 6file5 argument, that
  339.           file is loaded instead.  The debugger searches for the 6file5 in the current
  340.           directory first, then in the HOME directory.
  341.  
  342.           Whether or not there was a 6program5 argument to execute  and/or  a  startup
  343.           file,  the  debugger  ultimately  displays its prompt, a colon (":").  Any
  344.           time you see the colon prompt, the debugger is waiting for you to  type  a
  345.           command  line.   Command  lines  consist  of commands and their arguments.
  346.           Multiple commands on one command line are separated by  semicolons  (";").
  347.           Multiple-letter commands must be separated from their arguments by a space
  348.           (e.g.  "7where 512322"), while single-letter commands  don't  need  a  space
  349.           (e.g.  "d12322" or "d 12322").
  350.  
  351.           You can always use ^S (control-S) to stop the debugger's output and ^Q  to
  352.           start  it  again.   You  can usually use ^C to abort a command, especially
  353.           commands which generate long listings.
  354.  
  355.           All numbers printed by the debugger are in hex.  All numbers you type  are
  356.  
  357.  
  358.       4                                                      "189  1988,1990 Atari Corp.
  359.  
  360.  
  361.  
  362.  
  363.  
  364.  
  365.  
  366.             JANUARY, 1990                   ATARI DEBUGGER                              DB
  367.  
  368.  
  369.                 assumed  to  be  hex,  unless  prefixed  with 7@ 5(decimal), 7^ 5(octal), or 7%
  370.                 5(binary).
  371.  
  372.                 When debugging programs compiled under Mark Williams C, you need to play a
  373.                 trick before you start the program. See the section 7DB AND MARK WILLIAMS C
  374.                 5in the chapter 7OPERATING SYSTEM CONSIDERATIONS 5for more information.
  375.  
  376.                 When 7remote debugging5, the debugger will display its version number,  then
  377.                 wait for the stub to respond before loading the configuration script.
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.  
  402.  
  403.  
  404.  
  405.  
  406.  
  407.  
  408.  
  409.  
  410.  
  411.  
  412.  
  413.  
  414.  
  415.  
  416.  
  417.  
  418.  
  419.  
  420.  
  421. U
  422.  
  423. U            "189  1988,1990 Atari Corp.                                                      5
  424.  
  425.  
  426.  
  427.  
  428.  
  429.  
  430.  
  431.       DB                              ATARI DEBUGGER                   JANUARY, 1990
  432.  
  433.  
  434.  
  435.  
  436.  
  437.  
  438.  
  439.  
  440.  
  441.  
  442.  
  443.  
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467.  
  468.  
  469.  
  470.  
  471.  
  472.  
  473.  
  474.  
  475.  
  476.  
  477.  
  478.  
  479.  
  480.  
  481.  
  482.  
  483.  
  484.  
  485.  
  486. U
  487.  
  488. U      6                                                      "189  1988,1990 Atari Corp.
  489.  
  490.  
  491.  
  492.  
  493.  
  494.  
  495.  
  496.  
  497.  
  498.  
  499.                                                 7CHAPTER  2
  500.  
  501.  
  502.                                      EXPRESSIONS, RANGES, AND STRINGS
  503.  
  504.  
  505.  
  506.             5This chapter describes how values are entered into  the  debugger,  mostly  as
  507.             arguments  to commands.  An 6expression5 is something which boils down to a sin-
  508.             gle numeric value.  A 6range5 is  something  which  boils  down  to  a  starting
  509.             address  and a length: a range of addresses. A 6string5 is something which boils
  510.             down to a series of single-byte values.  A section on each follows.
  511.  
  512.  
  513.             7EXPRESSIONS
  514.  
  515.                 5An 6expression5 can be used any time a numeric value  (like  an  address  or
  516.                 count) is expected. All expressions evaluate to 32-bit integers.  Overflow
  517.                 is checked when reading a constant (so the hex constant  $FFFFFFFF0  would
  518.                 cause  and error because it requires 36 bits).  Overflow is not checked in
  519.                 any other situation.  There are two kinds of expressions:  6simple5  expres-
  520.                 sions and 6complex5 expressions.
  521.  
  522.  
  523.                 7SIMPLE EXPRESSIONS
  524.  
  525.                     5Simple expressions contain  no  operators  and  are  not  enclosed  in
  526.                     parentheses.   There  may  not  be  any spaces in a simple expression.
  527.                     Simple expressions take one of the following forms:
  528.  
  529.  
  530.                     6hex5 6constant5
  531.                     7$56hex5 6constant5
  532.                         A hex  constant  has  the  obvious  value.   The  leading  '7$5'  is
  533.                         optional:  with  no prefix, a number is assumed to be hexadecimal.
  534.                         Hex constants consist of an optional sign (+ or -) followed by one
  535.                         or more of the digits 705-795, 7A5-7F5, and 7a5-7f5.
  536.  
  537.                         Examples: 0, 1, 3FA, 13aD4, $ffffa4d0, $-5b30 (same as $ffffa4d0).
  538.  
  539.  
  540.                     7@56decimal5 6constant5
  541.                         A decimal constant begins with an at-sign ("7@5"), then an  optional
  542.                         sign  (+  or  -), then one or more digits 705-795.  It has the obvious
  543.                         value.
  544.  
  545.                         Examples: @0, @99, @-32768 (same as ffff8000).
  546.  
  547.  
  548.                     7^56octal5 6constant5
  549.                         An octal constant begins with a circumflex (up-arrow,  "7^5"),  then
  550.                         an  optional  sign  (+ or -), then one or more digits 705-775.  It has
  551.                         the obvious value.
  552.  
  553.  
  554.             JANUARY, 1990                   ATARI DEBUGGER                              DB
  555.  
  556.  
  557.  
  558.  
  559.  
  560.  
  561.  
  562.       DB                              ATARI DEBUGGER                   JANUARY, 1990
  563.  
  564.  
  565.                   Examples: ^0, ^77, ^20000000000 (same as 80000000).
  566.  
  567.  
  568.               7%56binary5 6constant5
  569.                   A binary constant  begins  with  a  percent-sign  ("7%5"),  then  an
  570.                   optional  sign  (+ or -), then one or more digits 705-715.  It has the
  571.                   obvious value.
  572.  
  573.                   Examples: %0, %1010, %1000000000000000 (same as 00008000).
  574.  
  575.  
  576.               7.56symbol5
  577.                   A leading period ('7.5') indicates that what  follows  is  a  symbol
  578.                   specification.  The value of the expression is the 32-bit value in
  579.                   the symbol's value field.  A symbol specification  can  simply  be
  580.                   the name of the symbol (e.g.  ".start") or something more complex.
  581.                   See the chapter 7SYMBOLS AND DEBUGGER VARIABLES 5for  more  informa-
  582.                   tion.
  583.  
  584.                   Examples: .main, .gemlib:xmain:__main:L3
  585.  
  586.  
  587.               7`56variable5
  588.                   A leading  backquote  ('7`5')  indicates  that  what  follows  is  a
  589.                   debugger  variable name. The value of this expression is the value
  590.                   in the corresponding debugger variable. See  the  chapter  7SYMBOLS
  591.                   AND DEBUGGER VARIABLES 5for more information.
  592.  
  593.                   Examples: `d0, `clientbp, `mtype
  594.  
  595.  
  596.               7&56variable5
  597.                   A leading  ampersand  ('7&5')  indicates  that  what  follows  is  a
  598.                   debugger  variable  name,  and the value of this expression is the
  599.                   6address5 of the  storage  for  indicated  variable  6in5  6the5  6stub5'6s5
  600.                   6memory5.    These  variables  should  not  be  changed,  since  the
  601.                   debugger's local copy of the variable might overwrite your change.
  602.                   However,  these  addresses  can  be  used  in memory checks to set
  603.                   checkpoints on the values in registers.
  604.  
  605.                   See the section 7DEBUGGER VARIABLES  5in  the  chapter  7SYMBOLS  AND
  606.                   DEBUGGER  VARIABLES  5(especially the subsection 7Client Registers5),
  607.                   and the section 7MEMORY CHECKPOINTS ON VALUES IN REGISTERS  5in  the
  608.                   chapter  7THE  CLIENT, BREAKPOINTS AND CHECKPOINTS: DETAIL 5for more
  609.                   information.
  610.  
  611.                   Examples: &d1, &pc, &sr
  612.  
  613.  
  614.               7$
  615.                   5The dollar-sign alone is short for 7`$5.  This temporary variable is
  616.                   set  to  the  result  of  the  last math command (that is, just an
  617.                   expression on the  command  line).   In  addition,  the  7f  5(find)
  618.  
  619.  
  620.       8                                                      "189  1988,1990 Atari Corp.
  621.  
  622.  
  623.  
  624.  
  625.  
  626.  
  627.  
  628.             JANUARY, 1990                   ATARI DEBUGGER                              DB
  629.  
  630.  
  631.                         command sets 7$ 5to the address of the start of the first match.
  632.  
  633.                         Example: $
  634.  
  635.  
  636.                 7COMPLEX EXPRESSIONS
  637.  
  638.                     5A 6complex5 6expression5 is a LISP-like expression containing parentheses,
  639.                     operators  and operands in prefix notation. Unlike simple expressions,
  640.                     there may be spaces in a complex expression.
  641.  
  642.                     The first element within the parentheses of a complex expression  must
  643.                     be  an  operator.   The second and subsequent elements must be expres-
  644.                     sions (simple or complex) which are used as operands for  that  opera-
  645.                     tor.
  646.  
  647.                     In the following table of operators, "exp  ..."  means  "one  or  more
  648.                     expressions."  For the logical operators (and the 7if 5command), zero is
  649.                     "false" and anything nonzero is "true."  The logical  operators  them-
  650.                     selves all return the number 1 if the expression is TRUE.
  651.  
  652.  
  653.  
  654.  
  655.  
  656.  
  657.  
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664.  
  665.  
  666.  
  667.  
  668.  
  669.  
  670.  
  671.  
  672.  
  673.  
  674.  
  675.  
  676.  
  677.  
  678.  
  679.  
  680.  
  681.  
  682.  
  683. U
  684.  
  685. U            "189  1988,1990 Atari Corp.                                                      9
  686.  
  687.  
  688.  
  689.  
  690.  
  691.  
  692.  
  693.       DB                              ATARI DEBUGGER                   JANUARY, 1990
  694.  
  695.  
  696. D
  697.               ______________________________________________________________
  698. U               FORMAT           COMMENTS
  699.  
  700.                7MATH
  701.                5(+ exp ...)      Add the expressions together
  702.                (- exp1 exp2)    Subtract exp2 from exp1
  703.                (* exp ...)      Multiply the expressions together
  704.                (/ exp1 exp2)    Divide exp1 by exp2
  705.                (% exp1 exp2)    Return exp1 modulo exp2
  706.  
  707.                7BITWISE
  708.                5(& exp ...)      Bitwise AND the expressions together
  709.                (| exp ...)      Bitwise OR the expressions together
  710.                (^ exp ...)      Bitwise EXCLUSIVE OR the expressions
  711.                (~ exp)          Bitwise NOT (invert) the expression
  712.                (>> exp1 exp2)
  713.                                 exp1 >> exp2 (that is, exp1  shifted  right
  714.                                 by exp2 bits (zero fill))
  715.                (<< exp1 exp2)
  716.                                 exp1 << exp2 (that is, exp1 shifted left by
  717.                                 exp2 bits)
  718.  
  719.                7LOGICAL
  720.                5(= exp1 exp2)    TRUE if the expressions are equal (also ==)
  721.                (&& exp1 exp2)   Logical AND of the two expressions
  722.                (|| exp1 exp2)   Logical OR of the two expressions
  723.                (^^ exp1 exp2)   Logical EXCLUSIVE OR of the two expressions
  724.                (! exp)          Logical NOT of the expression
  725.                (> exp1 exp2)    TRUE if exp1 > exp2 (unsigned)
  726.                (< exp1 exp2)    TRUE if exp1 < exp2 (unsigned)
  727.                (s> exp1 exp2)   TRUE if exp1 > exp2 (signed)
  728.                (s< exp1 exp2)   TRUE if exp1 < exp2 (signed)
  729.  
  730.                7MEMORY
  731.                5(lpeek exp)      Returns the longword at address exp
  732.                (wpeek exp)      Returns the word at address exp
  733.                (peek exp)       Returns the byte at address exp
  734. D
  735.               ______________________________________________________________
  736.                |✓D
  737. |✓
  738. |✓
  739. |✓
  740. |✓
  741. |✓
  742. |✓
  743. |✓
  744. |✓
  745. |✓
  746. |✓
  747. |✓
  748. |✓
  749. |✓
  750. |✓
  751. |✓
  752. |✓
  753. |✓
  754. |✓
  755. |✓
  756. |✓
  757. |✓
  758. |✓
  759. |✓
  760. |✓
  761. |✓
  762. |✓
  763. |✓
  764. |✓
  765. |✓
  766. |✓
  767. |✓
  768. |✓
  769. |✓
  770. |
  771.  
  772.  
  773.  
  774.  
  775.  
  776.  
  777.  
  778.  
  779.  
  780.  
  781.  
  782.  
  783.  
  784.  
  785.  
  786.  
  787.  
  788.  
  789.  
  790.  
  791.  
  792.  
  793.  
  794.  
  795.  
  796.  
  797.  
  798.  
  799.  
  800.  
  801.  
  802.  
  803. U
  804.                                                                              |✓D
  805. |✓
  806. |✓
  807. |✓
  808. |✓
  809. |✓
  810. |✓
  811. |✓
  812. |✓
  813. |✓
  814. |✓
  815. |✓
  816. |✓
  817. |✓
  818. |✓
  819. |✓
  820. |✓
  821. |✓
  822. |✓
  823. |✓
  824. |✓
  825. |✓
  826. |✓
  827. |✓
  828. |✓
  829. |✓
  830. |✓
  831. |✓
  832. |✓
  833. |✓
  834. |✓
  835. |✓
  836. |✓
  837. |✓
  838. |
  839.  
  840.  
  841.  
  842.  
  843.  
  844.  
  845.  
  846.  
  847.  
  848.  
  849.  
  850.  
  851.  
  852.  
  853.  
  854.  
  855.  
  856.  
  857.  
  858.  
  859.  
  860.  
  861.  
  862.  
  863.  
  864.  
  865.  
  866.  
  867.  
  868.  
  869.  
  870.  
  871.  
  872.  
  873. U
  874.               Here are some examples of complex expressions and how they evaluate:
  875.  
  876.  
  877.  
  878.  
  879.  
  880.  
  881.  
  882.  
  883.  
  884.  
  885.  
  886.  
  887.  
  888.  
  889. U
  890.  
  891.  
  892. U      10                                                     "189  1988,1990 Atari Corp.
  893.  
  894.  
  895.  
  896.  
  897.  
  898.  
  899.  
  900.             JANUARY, 1990                   ATARI DEBUGGER                              DB
  901.  
  902.  
  903. D
  904.                     ________________________________________________________________
  905. U                     EXPRESSION              VALUE   COMMENTS
  906.  
  907.                      (+ 2 3 3)                   8   simple addition
  908.                      (- 7 5)                     2   simple subtraction
  909.                      (* (+ 2 1) 3)               9   nested complex expressions
  910.                      (+ `clientbp 100)               gives the client's text base
  911.                      (lpeek (+ 4 `d0 `a0))           the addressing mode 4(a0,d0.l)
  912.                                                  8
  913.                      (+ (+ 3 1) (/ (* 2 8)
  914.                      4))
  915.                                                      in     algebraic     notation:
  916.                                                      (3 + 1) + ((2 x 8) / 4)
  917. D
  918.                     ________________________________________________________________
  919.                      |✓D
  920. |✓
  921. |✓
  922. |✓
  923. |✓
  924. |✓
  925. |✓
  926. |✓
  927. |✓
  928. |
  929.  
  930.  
  931.  
  932.  
  933.  
  934.  
  935.  
  936. U
  937.                                                                                      |✓D
  938. |✓
  939. |✓
  940. |✓
  941. |✓
  942. |✓
  943. |✓
  944. |✓
  945. |✓
  946. |
  947.  
  948.  
  949.  
  950.  
  951.  
  952.  
  953.  
  954.  
  955.  
  956. U
  957.  
  958.             7RANGES
  959.  
  960.                 5A 6range5 is a way to specify a block of memory.   A  range  consists  of  a
  961.                 start  address  and  either  an end address or a count.  For most commands
  962.                 which take a range, the start and count values have defaults, so  not  all
  963.                 parts of the range need to be typed in.
  964.  
  965.                 A fully-specified range can look like "6start57,56end5" or "6start57[56count57]5" (where
  966.                 6start5, 6end5, and 6count5 are expressions, and the brackets and commas must be
  967.                 typed as shown). If the 6end5 address is present, it is  the  first  address
  968.                 6not5  included  in the range: 7100,200 5specifies the range of addresses from
  969.                 100 to 1FF, inclusive.
  970.  
  971.                 Various parts of the full specification can be  omitted.   A  range  which
  972.                 uses  the default start address looks like "7,56end5" (note the leading comma,
  973.                 showing that 6start5 was omitted) or "7[56count57]5" (the brackets set  off  6count5
  974.                 and show that 6start5 was omitted).  If you want the default 6count5 the range
  975.                 just looks like "6start5" (which also looks like any other expression).
  976.  
  977.                 Here are some examples and the ranges they specify, assuming  the  default
  978.                 start is 100 and the default count is 80 (all numbers are hex):
  979.  
  980. D
  981.                 _________________________________________________________
  982. U                 RANGE     FIRST   LAST   COMMENTS
  983.  
  984.                  200[70]     200    26F   no defaults; 6start57[56count57] 5form
  985.                  200         200    27F   default count of 80
  986.                  [70]        100    16F   default start; 7[56count57] 5form
  987.                  80,100       80     FF   no defaults; 6start57,56end5 form
  988.                  ,200        100    1FF   default start; 7,56end5 form
  989. D
  990.                 _________________________________________________________
  991.                  |✓D
  992. |✓
  993. |✓
  994. |✓
  995. |✓
  996. |✓
  997. |✓
  998. |
  999.  
  1000.  
  1001.  
  1002.  
  1003.  
  1004. U
  1005.                                                                           |✓D
  1006. |✓
  1007. |✓
  1008. |✓
  1009. |✓
  1010. |✓
  1011. |✓
  1012. |
  1013.  
  1014.  
  1015.  
  1016.  
  1017.  
  1018.  
  1019.  
  1020. U
  1021.                 Sometimes the start and/or count fields have no defaults; in these  cases,
  1022.                 they  must  be  specified.   Also,  the  6start57[56count57]  5form  is not always
  1023.                 allowed.  This is the case for the 7g 5(go) command, where a count of  bytes
  1024.                 to execute does not make sense.
  1025.  
  1026.                 The default start and count values are listed in the descriptions for  all
  1027.                 commands which take a range argument.
  1028.  
  1029.  
  1030.  
  1031. U            "189  1988,1990 Atari Corp.                                                     11
  1032.  
  1033.  
  1034.  
  1035.  
  1036.  
  1037.  
  1038.  
  1039.       DB                              ATARI DEBUGGER                   JANUARY, 1990
  1040.  
  1041.  
  1042.       7STRINGS
  1043.  
  1044.           56Strings5 are used mainly by the 7f 5(find) and 7s  5(memory  set)  commands.  A
  1045.           string  consists  of characters surrounded by double-quotes  (7"56string57"5) or
  1046.           single-quotes (7'56string57'5). The string  acts  like  the  sequence  of  bytes
  1047.           represented  by  the  characters  between  the  quotes, with the following
  1048.           escapes:
  1049.  
  1050. D
  1051.           ___________________________________________________
  1052. U           ESCAPE   MEANING
  1053.  
  1054.            \b       backspace ($08)
  1055.            \e       escape ($1B)
  1056.            \f       formfeed ($0C)
  1057.            \n       linefeed ($0A)
  1058.            \r       carriage return ($0D)
  1059.            \t       tab ($09)
  1060.            \\       the single character backslash ($5C)
  1061.            \?       the special "wildcard" escape (see 7find5)
  1062.            \xXX     the byte $XX where XX is two hex digits
  1063. D
  1064.           ___________________________________________________
  1065.            |✓D
  1066. |✓
  1067. |✓
  1068. |✓
  1069. |✓
  1070. |✓
  1071. |✓
  1072. |✓
  1073. |✓
  1074. |✓
  1075. |✓
  1076. |
  1077.  
  1078.  
  1079.  
  1080.  
  1081.  
  1082.  
  1083.  
  1084.  
  1085.  
  1086. U
  1087.                                                               |✓D
  1088. |✓
  1089. |✓
  1090. |✓
  1091. |✓
  1092. |✓
  1093. |✓
  1094. |✓
  1095. |✓
  1096. |✓
  1097. |✓
  1098. |
  1099.  
  1100.  
  1101.  
  1102.  
  1103.  
  1104.  
  1105.  
  1106.  
  1107.  
  1108.  
  1109.  
  1110. U
  1111.           Quotation marks are also used to set off parts of commands and keep  semi-
  1112.           colons from splitting up a command.  See the chapter 7PROCEDURES, IF, GOTO,
  1113.           DEFER, AND ALIAS 5for more information.
  1114.  
  1115.  
  1116.  
  1117.  
  1118.  
  1119.  
  1120.  
  1121.  
  1122.  
  1123.  
  1124.  
  1125.  
  1126.  
  1127.  
  1128.  
  1129.  
  1130.  
  1131.  
  1132.  
  1133.  
  1134.  
  1135.  
  1136.  
  1137.  
  1138.  
  1139.  
  1140.  
  1141. U
  1142.  
  1143.  
  1144. U      12                                                     "189  1988,1990 Atari Corp.
  1145.  
  1146.  
  1147.  
  1148.  
  1149.  
  1150.  
  1151.  
  1152.  
  1153.  
  1154.  
  1155.                                                 7CHAPTER  3
  1156.  
  1157.  
  1158.                             THE CLIENT, BREAKPOINTS, AND CHECKPOINTS: AN OVERVIEW
  1159.  
  1160.  
  1161.  
  1162.  
  1163.  
  1164.             RUNNING THE CLIENT PROGRAM
  1165.  
  1166.                 5Once there is a client ready to run (loaded with the 7exec 5command or  with
  1167.                 a  6program5  argument  on the debugger's command line), you can cause it to
  1168.                 run with the 7g 5(go), 7t 5(trace), 7u 5(untrace), and  7v  5(verbose-trace)  com-
  1169.                 mands.   Collectively,  these  are called trace/go commands.  What follows
  1170.                 are cursory descriptions.  See the chapter  7THE  CLIENT,  BREAKPOINTS  AND
  1171.                 CHECKPOINTS: DETAIL 5for more information.
  1172.  
  1173.                 The 7g 5(go) command runs the client at full speed.  It will only stop  when
  1174.                 something  exceptional happens, like hitting a breakpoint or causing a bus
  1175.                 error.  You can also stop it by hitting the stop button, if you have  one.
  1176.                 See  the  section  7STOP  BUTTONS  5in the chapter 7REMOTE DEBUGGING 5for more
  1177.                 information.
  1178.  
  1179.                 The 7t 5(trace) and 7u 5(untrace) commands cause the client to execute just  a
  1180.                 few instructions (sometimes just one) and then stop and display the regis